<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
</head>

<body>
  <button id="button">button</button>
</body>

</html>
<script>
  window.onload = function(){
    document.getElementById("button").onclick = function () {
      console.log(123)
      if (wx.miniProgram) {
        console.log(456, wx.miniProgram.navigateTo, wx.miniProgram)
        wx.miniProgram.reLaunch({
          url: 'subpackage/products/search/search?page_as_function_id=x89b5cibyqp',
          complete: function (data) {
            console.log(data, 666)
          }
        })
      }
    }
  }

</script>